<template>
    <div class="title" :style="{ width: `${width}px` }">
        <slot></slot>
    </div>
</template>
<script setup>
defineProps({
    width: {
        type: Number,
        default: 200
    }
})
</script>
<style lang="scss" scoped>
.title {
    height: 32px;
    line-height: 32px;
    background: linear-gradient(90deg, rgba(1, 148, 145, 0) 0%, rgba(1, 148, 145, 1) 49.31%, rgba(1, 148, 145, 0) 100%);
    margin: auto;
    text-align: center;
    font-size: 19px;
    text-shadow: 0 0 5px rgba(0, 94, 93, 1);
    font-weight: 600;
    color: #fff;
    position: relative;

    &::before {
        content: '';
        position: absolute;
        width: 100%;
        top: 0;
        left: 0;
        height: 2px;
        background: linear-gradient(90deg, rgba(4, 209, 206, 0) 0%, rgba(4, 209, 206, 1) 50%, rgba(4, 209, 206, 0) 100%);
    }

    &::after {
        content: '';
        position: absolute;
        width: 100%;
        bottom: 0;
        left: 0;
        height: 2px;
        background: linear-gradient(90deg, rgba(4, 209, 206, 0) 0%, rgba(4, 209, 206, 1) 50%, rgba(4, 209, 206, 0) 100%);
    }
}
</style>